package chatRoom.com.fenwe.controller.response;

import java.util.List;

import lombok.Data;

@Data
public class BaseResponse {
    private Integer code;
    private String remark;
    private Object result;

    public BaseResponse(Integer code, String remark) {
        super();
        this.code = code;
        this.remark = remark;
    }

    private List<?> results;

    public BaseResponse(Integer code, String remark, Object result, List<Object> results) {
        super();
        this.code = code;
        this.remark = remark;
        this.result = result;
        this.results = results;
    }

    public BaseResponse(Integer code, String remark, Object result) {
        super();
        this.code = code;
        this.remark = remark;
        if (result instanceof List<?>) {
            this.results = (List<?>) result;
        } else {
            this.result = result;
        }
    }
}
